package com.company.service;

import com.company.dao.GuanjianciDao;
import com.company.entity.Guanjianci;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GuanjianciService {

    @Autowired
    private GuanjianciDao guanjianciDao;

    public String query() {
        return guanjianciDao.findAll().get(0).getGuanjianci();
    }


    public void update(Guanjianci guanjianci) {
        Guanjianci guanjianci1 = guanjianciDao.findAll().get(0);
        guanjianci.setId(guanjianci1.getId());
        guanjianciDao.save(guanjianci);
    }

}
